import { settimeNth } from './settimeNth';

/**
 * 睡眠 num 毫秒后 返回 promise<void>
 * @param num
 */
export async function sleep(num: number = 0) {
  let p = new Promise<void>((resolve) => {
    settimeNth(num, resolve);
  });

  return p;
}
